export class Overlay {

    dom: HTMLElement;

    constructor(dom: HTMLElement) {
        this.dom = dom;
    }

    hide() {
        this.dom.style.transform = `translate(0, -1000px)`;
    }

    show(x: number, y: number) {
        this.dom.style.transform = `translate(-50%, -50%) translate(${x}px, ${y}px)`;
    }

    setText(txt: string) {
        this.dom.innerText = txt;
    }

}